package com.aiju.cash.ui.stockupdate.bean;

import java.io.Serializable;
import java.util.List;

/**
 * 作者：流冥 on 2017/7/3 11:41
 * 说明：
 */

public class Stock {


    /**
     * id : 428
     * name : 默认分类
     * storeId : 53
     * createDate : 2017-06-16 17:52:19
     * modifyDate : 2017-06-16 17:52:18
     * goodsList : [{"id":1287,"name":"主店测试1","code":"9787300079301","goodsTypeId":428,"goodsTypeName":"默认分类","price":20,"unit":"件","imageUrl":"","createDate":"2017-06-20 11:33:08","modifyDate":"2017-06-30 18:59:18","storeId":"53","goodsType":"","relationGoodsId":"","inventory":10,"isRelation":"","surplus":"","yesterdayNum":""},{"id":1288,"name":"主店测试2","code":"9787111348665","goodsTypeId":428,"goodsTypeName":"默认分类","price":50,"unit":"件","imageUrl":"https://store.ecbao.cn/2017/06/20/17f2cf8f-8478-4bcf-82c7-1d398ae0e0a4.jpg","createDate":"2017-06-20 11:33:41","modifyDate":"2017-06-30 18:59:18","storeId":"53","goodsType":"","relationGoodsId":"","inventory":10,"isRelation":"","surplus":"9","yesterdayNum":""}]
     * relationGoodsTypeId :
     * relationTotal :
     */

    private int id;
    private String name;
    private String storeId;
    private String createDate;
    private String modifyDate;
    private String relationGoodsTypeId;
    private String relationTotal;
    private List<GoodsListBean> goodsList;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getStoreId() {
        return storeId;
    }

    public void setStoreId(String storeId) {
        this.storeId = storeId;
    }

    public String getCreateDate() {
        return createDate;
    }

    public void setCreateDate(String createDate) {
        this.createDate = createDate;
    }

    public String getModifyDate() {
        return modifyDate;
    }

    public void setModifyDate(String modifyDate) {
        this.modifyDate = modifyDate;
    }

    public String getRelationGoodsTypeId() {
        return relationGoodsTypeId;
    }

    public void setRelationGoodsTypeId(String relationGoodsTypeId) {
        this.relationGoodsTypeId = relationGoodsTypeId;
    }

    public String getRelationTotal() {
        return relationTotal;
    }

    public void setRelationTotal(String relationTotal) {
        this.relationTotal = relationTotal;
    }

    public List<GoodsListBean> getGoodsList() {
        return goodsList;
    }

    public void setGoodsList(List<GoodsListBean> goodsList) {
        this.goodsList = goodsList;
    }

    public static class GoodsListBean implements Serializable {
        /**
         * id : 1287
         * name : 主店测试1
         * code : 9787300079301
         * goodsTypeId : 428
         * goodsTypeName : 默认分类
         * price : 20
         * unit : 件
         * imageUrl :
         * createDate : 2017-06-20 11:33:08
         * modifyDate : 2017-06-30 18:59:18
         * storeId : 53
         * goodsType :
         * relationGoodsId :
         * inventory : 10
         * isRelation :
         * surplus :
         * yesterdayNum :
         */

        private int id;
        private String name;
        private String code;
        private int goodsTypeId;
        private String goodsTypeName;
        private int price;
        private String unit;
        private String imageUrl;
        private String createDate;
        private String modifyDate;
        private String storeId;
        private String goodsType;
        private String relationGoodsId;
        private int inventory;
        private String isRelation;
        private String surplus;
        private String yesterdayNum;

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getCode() {
            return code;
        }

        public void setCode(String code) {
            this.code = code;
        }

        public int getGoodsTypeId() {
            return goodsTypeId;
        }

        public void setGoodsTypeId(int goodsTypeId) {
            this.goodsTypeId = goodsTypeId;
        }

        public String getGoodsTypeName() {
            return goodsTypeName;
        }

        public void setGoodsTypeName(String goodsTypeName) {
            this.goodsTypeName = goodsTypeName;
        }

        public int getPrice() {
            return price;
        }

        public void setPrice(int price) {
            this.price = price;
        }

        public String getUnit() {
            return unit;
        }

        public void setUnit(String unit) {
            this.unit = unit;
        }

        public String getImageUrl() {
            return imageUrl;
        }

        public void setImageUrl(String imageUrl) {
            this.imageUrl = imageUrl;
        }

        public String getCreateDate() {
            return createDate;
        }

        public void setCreateDate(String createDate) {
            this.createDate = createDate;
        }

        public String getModifyDate() {
            return modifyDate;
        }

        public void setModifyDate(String modifyDate) {
            this.modifyDate = modifyDate;
        }

        public String getStoreId() {
            return storeId;
        }

        public void setStoreId(String storeId) {
            this.storeId = storeId;
        }

        public String getGoodsType() {
            return goodsType;
        }

        public void setGoodsType(String goodsType) {
            this.goodsType = goodsType;
        }

        public String getRelationGoodsId() {
            return relationGoodsId;
        }

        public void setRelationGoodsId(String relationGoodsId) {
            this.relationGoodsId = relationGoodsId;
        }

        public int getInventory() {
            return inventory;
        }

        public void setInventory(int inventory) {
            this.inventory = inventory;
        }

        public void setIsRelation(String isRelation) {
            this.isRelation = isRelation;
        }

        public String getSurplus() {
            if (Double.valueOf(surplus) < 0){
                return "0";
            }
            return surplus;
        }

        public void setSurplus(String surplus) {
            this.surplus = surplus;
        }

        public String getYesterdayNum() {
            return yesterdayNum;
        }

        public void setYesterdayNum(String yesterdayNum) {
            this.yesterdayNum = yesterdayNum;
        }
    }
}
